﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using KPIS.GERP.GIMS.MODEL;
using KPIS.GERP.GIMS.DAL;
using KPIS.GERP.GIMS.DALFactory;
using KPIS.DBM;

namespace KPIS.GERP.GIMS.BLL
{
    public class PurchaseOrderCommitteeBLL
    {
        private static readonly PurchaseOrderCommitteeDAL dal = DataAccess.CreatePurchaseOrderCommittee();

        public PurchaseOrderCommitteeBLL()
        {

        }

        public PurchaseOrderCommitteeInfo GetPurchaseOrderCommittee(int seq)
        {
            return dal.GetPurchaseOrderCommittee(seq);
        }

        public IList<PurchaseOrderCommitteeInfo> GetPurchaseOrderCommitteeFromPurchaseRequest(int bidder_seq)
        {
            return dal.GetPurchaseOrderCommitteeFromPurchaseRequest(bidder_seq);
        }

        public IList<PurchaseOrderCommitteeInfo> GetPurchaseOrderCommitteeFromBid(int bidder_seq)
        {
            return dal.GetPurchaseOrderCommitteeFromBid(bidder_seq);
        }

        public IList<PurchaseOrderCommitteeInfo> GetPurchaseOrderCommitteeWithParent(int po_seq)
        {
            return dal.GetPurchaseOrderCommitteeWithParent(po_seq);
        }

        public void Insert(IList<PurchaseOrderCommitteeInfo> infoList, Nullable<int> po_seq, PurchaseOrderInfo info, IDBManager dbManagerTrans)
        {
            dal.Insert(infoList, po_seq, info, dbManagerTrans);
        }

        public void Insert(PurchaseOrderCommitteeInfo info)
        {
            dal.Insert(info);
        }

        public void Update(PurchaseOrderCommitteeInfo info)
        {
            dal.Update(info);
        }

        public void DeleteAll(IList<PurchaseOrderCommitteeInfo> infoList)
        {
            dal.DeleteAll(infoList);
        }

        public void DeleteFromDB(IList<PurchaseOrderCommitteeInfo> infoList)
        {
            dal.DeleteFromDB(infoList);
        }
    }
}
